//
//  LoginViewController.m
//  A_GOGO
//
//  Created by Liuiu on 16/1/25.
//  Copyright © 2016年 www.lanou3g.com. All rights reserved.
//

#import "LoginViewController.h"
#import "RegisterViewController.h"
#import "UIColor+Wonderful.h"
#import "ViewController.h"

@interface LoginViewController ()

@end

@implementation LoginViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor =[UIColor lightCyan];
    self.navigationItem.title =@"登录";
    self.navigationController.navigationBar.translucent = NO;
    [self.navigationController.navigationBar setTitleTextAttributes:
     @{NSFontAttributeName:[UIFont fontWithName:@"Helvetica-Bold" size:19],
       NSForegroundColorAttributeName:[UIColor blackColor]}];
    self.navigationController.navigationBar.tintColor = [UIColor lightGrayColor];
    

    UIBarButtonItem *itemb =[[UIBarButtonItem alloc]initWithTitle:@"注册" style:UIBarButtonItemStylePlain target:self action:@selector(right:)];
    
    self.navigationItem.rightBarButtonItems = @[itemb];
    
    
    
    
    UIView *viewa =[[UIView alloc]initWithFrame:CGRectMake(45, 40, 285, 320)];
    viewa.backgroundColor =[UIColor snowColor];
    [self.view addSubview:viewa];
    viewa.layer.cornerRadius = 7;
    [viewa release];
    
    UIImageView *image =[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 45, 40)];
    image.image =[UIImage imageNamed:@"kuaijin"];
    image.backgroundColor =[UIColor clearColor];
    image.alpha = 0.95;
    image.center = CGPointMake(285/2 , 25);
    [viewa addSubview:image];
    [image release];
    
    UILabel *title =[[UILabel alloc]initWithFrame:CGRectMake(0, 0, 90, 55)];
    title.text = @"GOGO";
    title.textAlignment = NSTextAlignmentCenter;
    title.center = CGPointMake(285 / 2  , 60);
    title.font = [UIFont fontWithName:@"Helvetica-Bold" size:24];
    title.textColor = [UIColor lightGrayColor];
    [viewa addSubview:title];
    [title release];
    
    UIImageView *img =[[UIImageView alloc]initWithFrame:CGRectMake(10, 52, 30, 30)];
    img.center = CGPointMake(30, 115);
   
    img.image =[UIImage imageNamed:@"geren"];
    [viewa addSubview:img];
    [img release];
    
    UITextField *name =[[UITextField alloc]initWithFrame:CGRectMake(0, 0, 185, 40)];
    name.center = CGPointMake(285 / 2 +10, 115);
    name.layer.cornerRadius = 8;
    name.placeholder = @"请输入账户名";
    name.borderStyle = UITextBorderStyleRoundedRect;
    name.clearButtonMode = UITextFieldViewModeAlways;
    [viewa addSubview:name];
    [name release];
    
    UIImageView *img1 =[[UIImageView alloc]initWithFrame:CGRectMake(1, 030, 30, 30)];
    img1.center = CGPointMake(30, 180);
   
    img1.image =[UIImage imageNamed:@"suo"];
    [viewa addSubview:img1];
    [img1 release];
    
    UITextField *mima = [[UITextField alloc]initWithFrame:CGRectMake(0, 0, 185, 40)];
    mima.center = CGPointMake(285/ 2 + 10, 180);
    mima.layer.cornerRadius = 8;
    mima.placeholder = @"请输入密码";
    mima.borderStyle = UITextBorderStyleRoundedRect;
    mima.clearButtonMode = UITextFieldViewModeAlways;
    [viewa addSubview:mima];
    [mima release];
    
    UIButton *button =[UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(0, 0, 90, 45);
    button.center = CGPointMake(70, 255);
    [button setTitle:@"返回" forState:UIControlStateNormal];
    button.layer.cornerRadius = 7;
    button.layer.borderWidth = 0.3;
    button.layer.borderColor = [UIColor gainsboroColor].CGColor;
    [button setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
    [button addTarget:self action:@selector(back:) forControlEvents:UIControlEventTouchUpInside];
    [viewa addSubview:button];
    
    UIButton *button2 =[UIButton buttonWithType:UIButtonTypeCustom];
    button2.frame = CGRectMake(0, 0, 90, 45);
    button2.center = CGPointMake(210, 255);
    [button2 setTitle:@"登录" forState:UIControlStateNormal];
    [button2 setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
    [button2 addTarget:self action:@selector(Login:) forControlEvents:UIControlEventTouchUpInside];
    button2.layer.cornerRadius = 7;
    button2.layer.borderWidth = 0.3;
    button2.layer.borderColor =[UIColor gainsboroColor].CGColor;
    [viewa addSubview:button2];
    
    UILabel *buttom =[[UILabel alloc]initWithFrame:CGRectMake(0, 0, 200, 20)];
    buttom.text = @"Let's play and Go !";
    buttom.textColor = [UIColor lightGrayColor];
    buttom.center = CGPointMake(285 / 2, 300);
    buttom.font = [UIFont systemFontOfSize:13];
    buttom.textAlignment = NSTextAlignmentCenter;
    [viewa addSubview:buttom];
    [buttom release];
    
    UILabel *xian =[[UILabel alloc]initWithFrame:CGRectMake(0, 410, self.view.frame.size.width, 1)];
    xian.center = CGPointMake(375/ 2 , 410);
    xian.backgroundColor = [UIColor gainsboroColor];
    [self.view addSubview:xian];
    
    UILabel *biaoshi = [[UILabel alloc]initWithFrame:CGRectMake(0, 410, 160, 10)];
    biaoshi.textAlignment = NSTextAlignmentCenter;
    biaoshi.text = @"用其他账号登入";
    biaoshi.backgroundColor =[UIColor lightCyan];
    biaoshi.textColor = [UIColor  lightGrayColor];
    biaoshi.center = CGPointMake(375 / 2, 410);
    [self.view addSubview:biaoshi];
    [biaoshi release];
    
    
//********* 页面设置
    
    
    
    
    
}
#pragma mark -按钮区
- (void)Login:(UIButton *)btn
{
   [self dismissViewControllerAnimated:YES completion:^{
       
   }];
}

- (void)back:(UIButton *)btn
{
    [self dismissViewControllerAnimated:YES completion:^{
        
    }];
}

- (void)right:(UIBarButtonItem *)btn
{
    RegisterViewController *reg =[[RegisterViewController alloc]init];
    [self.navigationController pushViewController:reg animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
